/**
 * COPYRIGHT HangZhou Trustway Technology Company Limited
 * All right reserved.
 */
package com.robam.apollotest.apollotest.config;

import com.robam.apollotest.apollotest.common.Test;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description
 * @Author 薛铁琪
 * @CreateTime 2020-10-09 14:25
 * @Version 1.0
 */
@Configuration
@RefreshScope
public class ConfigBean {
    @Bean
    @ConfigurationProperties(prefix = "test")
    public Test getTest() {
        return new Test();
    }
//    @Value("${test.timeout}")
//    private int timeout;
//
//    @Value("${test.batch}")
//    private int batch;
//
//    @Bean
//    public Test getTest() {
//        Test test = new Test();
//        test.setBatch(batch);
//        test.setTimeout(timeout);
//        return test;
//    }
}
